﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;

using Xyz.BusinessObjects;
using Xyz.DataObjects;
using Xyz.DataObjects.Interfaces;
using Xyz.Service.DataTransferObjects;
using Xyz.Service.ServiceContracts;

namespace Xyz.Service
{
    
    /// <summary>
    /// This service will handle all methods for Flight Seat Services
    /// </summary>
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
    public class AircraftSeatService : IAircraftSeatService
    {  
        private static readonly IAircraftSeatDao AircraftSeatDao = DataAccess.AircraftSeatDao;
        
        public List<AircraftSeatDTO> GetAllAircraftSeats(int aircraftId)
        {

            return Mapper.ToDto(AircraftSeatDao.GetAllAircraftSeats(aircraftId));
        }

        public List<AircraftSeatDTO> GetAircraftSeatByAircraftIdSeatTypeCode(int aircraftId, string seatTypeCode)
        {

            return Mapper.ToDto(AircraftSeatDao.GetAircraftSeatByAircraftIdSeatTypeCode(aircraftId,seatTypeCode));
        }
       

        public AircraftSeatDTO getAircraftSeatByAircraftIdSeatCode(int aircraftId, string seatCode)
        {

            return Mapper.ToDto(AircraftSeatDao.GetAircraftSeatByAircraftIdSeatCode(aircraftId, seatCode));
        }
    }
}
